﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Himp.Base
{
    /// <summary>
    /// Enum转List
    /// </summary>
    public static class EnumToListHelper
    {
        public static Dictionary<int, string> Converter<T>()
        {
            var dict = new Dictionary<int, string>();

            foreach (var e in Enum.GetValues(typeof(T)))
            {
                dict.Add(Convert.ToInt32(e), e.ToString());
            }

            return dict;
        }
    }
}
